var mongoose = require('mongoose')

mongoose.connect('mongodb://zg6:eBxBJKSAMkNJMpHb@8.130.141.170:27017/zg6?authMechanism=DEFAULT&authSource=zg6')
const conn = mongoose.connection

conn.on('open', () => {
    console.log('服务器已启动');
})

conn.on('error', (err) => {
    console.log(err);
})

module.exports = mongoose